param(
    [string]$ScriptPath = ".\RunExeServer.ps1"
)

# 获取脚本绝对路径
$fullPath = (Resolve-Path $ScriptPath).Path

$startInfo = New-Object System.Diagnostics.ProcessStartInfo
$startInfo.FileName = "powershell.exe"
$startInfo.Arguments = "-NoProfile -ExecutionPolicy Bypass -File `"$fullPath`""
$startInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden
$startInfo.CreateNoWindow = $true
$startInfo.UseShellExecute = $false

[System.Diagnostics.Process]::Start($startInfo) | Out-Null
